function main2222() {
    var library_name = "libGLESv2.so" // ex: libsqlite.so
    var loaded = false
    var enums = Module.enumerateSymbols("linker")
    var dlopen = null
    for (var i =0 ; i< enums.length ; i++ ){
        if(enums[i].name == "__dl__ZL10dlopen_extPKciPK17android_dlextinfoPKv"){
            dlopen = enums[i].address
        }
    }
    var i = 0
    dlopen =  Module.findExportByName(null, "dlopen")
    console.log("dlopen", dlopen)
    Interceptor.attach(dlopen,{
        onEnter: function(args){
            var library_path = Memory.readCString(args[0])
            console.log("found library : " + library_path)
            if( library_path.includes(library_name)){
                console.log("found library : " + library_path)
                loaded = true
            }
        },
        onLeave: function(args){
            if(loaded){
           var jni_OnLoad = Module.findExportByName(library_name,"JNI_OnLoad")
           var base_addr = Module.findBaseAddress(library_name)
           console.log("base_addr : " + base_addr)
           console.log("jni_OnLoad_symbol : " + jni_OnLoad)

           var enums = Module.enumerateSymbols(library_name)
           var dlopen = null
           for (var i =0 ; i< enums.length ; i++ ){
            console.log("name : " + enums[i].name)
           }
 


         
        }
        }
    })
  

}

setImmediate(main2222)


// frida -U com.hnzh.dldlwhjx.aligames -l c2ddldl

// frida -U --no-pause -f com.ftaro.kingwar.tyhjz -l c2dty

// frida -U com.ftaro.kingwar.tyhjz -l c2dty
// frida -U cn.alltune.endless -l u3dtest

// frida -U --no-pause -f com.youzu.ss0.yuewbox -l u3dtest


// frida -U --no-pause -f cn.alltune.endless -l testlayair
// frida -U --no-pause -f com.shengshu04.yy -l testlayair
// frida -U --no-pause -f com.xlxx.sshg.aligames -l testlayair
